import React, { useState } from 'react';
// import { userState } from 'react';
const App = () => {
  // 状态数据
  let [uname,setUname] = useState('')
  let [upwd,setUpwd] = useState('')

  return (
    <div>
      <input onChange={(e)=>setUname(e.target.value)} value={uname} placeholder='请输入用户名' />
      <br/>
      <input type="password" onChange={(e)=>setUpwd(e.target.value)} value={upwd} placeholder='请输入密码' />
      <br/>
      <button onClick={()=>console.log(uname,upwd)}>登录</button>
    </div>
  );
}

export default App;
